package com.finstone.data.spider.eshop;

import java.util.List;

import com.finstone.data.spider.eshop.service.ISpiderService;

public class EShopSpiderService {

    private List<ISpiderService<?>> spiderServiceList;

    public void doSpider() {
        startSpider();
    }

    @SuppressWarnings("unchecked")
    private void startSpider() {
//        ((ISpiderService<String>) spiderServiceList.get(0)).putTask("http://s.lenovo.com.cn/?index=0&fromhomepage"); // 0:eShopPageService

        //微摄影
        ((ISpiderService<String>) spiderServiceList.get(0)).putTask("http://s.weibo.com/weibo/%2523%25E5%25BE%25AE%25E6%2591%2584%25E5%25BD%25B1%2523&Refer=index");

        for (ISpiderService<?> spiderService : spiderServiceList) {
            spiderService.start();
        }
    }

    public void setSpiderServiceList(List<ISpiderService<?>> spiderServiceList) {
        this.spiderServiceList = spiderServiceList;
    }
}